#include <iostream>
#include <stdlib.h>
#include <unistd.h>

#include <apr-1.0/apr.h>
#include <subversion-1/svn_client.h>

int main(int argc, char **argv)
{
  if(argc < 2)
    return EXIT_FAILURE;

  svn_opt_revision_t rev;
  rev.kind = svn_opt_revision_number;
  rev.value = 1;

  svn_client_ctx_t ctx;
  svn_error_t *err = svn_client_create_context(&ctx);
  if(err != SVN_NO_ERROR)
  {
    std::cout << err->message;
    return EXIT_FAILURE;
  }

  svn_client_checkout3(NULL,
                       argv[1],
                       "r1",
                       rev,
                       rev,
                       svn_depth_infinity,
                       0,
                       0,

                       );

  return EXIT_SUCCESS;
}

